#include "UserStruct.h"

UserStruct::UserStruct()
{
    m_isPrimary = false;
    m_name.clear();
    m_account.clear();
    m_password.clear();
    m_role.clear();
    m_permissionList.clear();
}
bool UserStruct::isPrimary() const
{
    return m_isPrimary;
}

void UserStruct::setIsPrimary(bool isPrimary)
{
    m_isPrimary = isPrimary;
}
QString UserStruct::name() const
{
    return m_name;
}

void UserStruct::setName(const QString &name)
{
    m_name = name;
}
QString UserStruct::account() const
{
    return m_account;
}

void UserStruct::setAccount(const QString &account)
{
    m_account = account;
}
QString UserStruct::password() const
{
    return m_password;
}

void UserStruct::setPassword(const QString &password)
{
    m_password = password;
}
QString UserStruct::role() const
{
    return m_role;
}

void UserStruct::setRole(const QString &role)
{
    m_role = role;
}
QStringList UserStruct::permissionList() const
{
    return m_permissionList;
}

void UserStruct::setPermissionList(const QStringList &permissionList)
{
    m_permissionList = permissionList;
}


QDebug operator <<(QDebug debug, const UserStruct &user)
{
    debug<<"isPrimary:"<<user.isPrimary()<<",Name:"<<user.name()<<",Account:"<<user.account()
         <<",Password:"<<user.password()<<",Role:"<<user.role()<<",PermissionList:"<<user.permissionList();
    return debug;
}
